package com.jshcbd.mvp_kt_demo.ui.main

import com.jshcbd.mvp_kt_demo.base.mvp.BasePresenter
import com.jshcbd.mvp_kt_demo.rxjava.BaseObserver
import com.jshcbd.mvp_kt_demo.rxjava.RxTransformer
import com.jshcbd.mvp_kt_demo.ui.main.bean.FootEntity


/**
 * Created by zzt
 * 2021/8/9
 */
class MainPresenter(view: MainContract.MainViewNew) :
    BasePresenter<MainContract.MainViewNew, MainContract.MainModelNew>(MainModel(), view) {

    fun getList() {
        mModel!!.infoData()
            .compose(RxTransformer.transform())
            .subscribe(object : BaseObserver<FootEntity>() {
                override fun onSuccess(response: FootEntity) {
                    mView?.setDataShowCriticToRecycleView(response.data)
                }

                override fun onFailure(msg: String?) {

                }
            })
    }


}